home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_24253.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  73 lines

  1. -- card: 24253 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2612
  5. -- name: sendSerial
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=82 top=302 right=324 bottom=182
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put installres(XCMD,sendSerial) into it
  24.   if it is empty then play oops
  25.   else answer it
  26. end mouseUp
  27.  
  28.  
  29.  
  30. -- part contents for background part 13
  31. ----- text -----
  32. 19
  33.  
  34. -- part contents for background part 2
  35. ----- text -----
  36. sendSerial
  37.  
  38. -- part contents for background part 10
  39. ----- text -----
  40.  
  41. Examples of use:
  42.  
  43.  
  44. SendSerial "12345"
  45.  
  46. ‚Ä¢sends the string 12345 out the modem port at 9600 baud (the default)
  47.  
  48.  
  49. SendSerial "12345", 1200
  50.  
  51. ‚Ä¢sends the string 12345 out the modem port at 1200 baud
  52.  
  53.  
  54. SendSerial "^41^42hello"
  55.  
  56. ‚Ä¢sends the string ABhello at 9600 baud (41 is hex for A; 42 is hex for B) 
  57. (^ is shift/6 and must be followed by exactly two hex digits)
  58.  
  59.  
  60. SendSerial "hello^^"
  61.  
  62. ‚Ä¢sends hello^ (use two ^^ if you 
  63. really want a ^)
  64.  
  65.  
  66. SendSerial "abcd^45^0D^0D", 2400
  67.  
  68. ‚Ä¢sends abcdE<CR><CR> at 2400 baud (<CR> = carriage return (Ascii 0D))
  69.  
  70. -- part contents for background part 3
  71. ----- text -----
  72.  
  73. Send characters out the serial port.